{{set . "title" "用户注册"}}

<html>
  <head>
    <title>{{.title}}</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" type="text/css" media="screen" href="/public/css/login.css">
    {{range .moreStyles}}
      <link rel="stylesheet" type="text/css" href="/public/{{.}}">
    {{end}}
    <script src="/public/js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="/public/js/sessvars.js" type="text/javascript" charset="utf-8"></script>
    {{range .moreScripts}}
<!--       <script src="/public/{{.}}" type="text/javascript" charset="utf-8"></script> -->
    {{end}}
  </head>
  <body>

  <div id="header">
        <h1>无花果平台新用户注册</h1>
        {{if .user}}
          <div id="options">
            Connected as {{.user.Username}}
            |
            <a href="{{url "Application.Logout"}}">Search</a>
          </div>
        {{end}}
  </div>

<h1>填写注册信息（* 为必填项）:</h1>

<div id="content">
<form action="{{url "Application.SaveUser"}}" method="POST">
  {{with $field := field "user.Username" .}}
    <p class="{{$field.ErrorClass}}">
      <strong>用户名:</strong>
      <input type="text" name="{{$field.Name}}" size="16" value="{{$field.Flash}}"> * 英文字母开头英文字母数字组合
      <span class="error">{{$field.Error}}</span>
    </p>
  {{end}}
  {{with $field := field "user.Name" .}}
    <p class="{{$field.ErrorClass}}">
      <strong>真实姓名:</strong> <input type="text" name="{{$field.Name}}" size="16" value="{{$field.Flash}}"> *
      <span class="error">{{$field.Error}}</span>
    </p>
  {{end}}
  {{with $field := field "user.Password" .}}
    <p class="{{$field.ErrorClass}}">
      <strong>密码:</strong> <input type="password" name="{{$field.Name}}" size="16" value="{{$field.Flash}}"> *
      <span class="error">{{$field.Error}}</span>
    </p>
  {{end}}
  {{with $field := field "verifyPassword" .}}
    <p class="{{$field.ErrorClass}}">
      <strong>确认密码:</strong> <input type="password" name="{{$field.Name}}" size="16" value="{{$field.Flash}}"> *
      <span class="error">{{$field.Error}}</span>
    </p>
  {{end}}
  <p class="buttons">
    <input type="submit" value="注册"> <a href="{{url "Application.Index"}}">取消</a>
  </p>
</form>

</div>

{{template "footer.html" .}}
